package com.huaixia.shorturl.service;

import com.huaixia.shorturl.common.ApiResponse;
import com.huaixia.shorturl.domain.UrlMap;
import com.huaixia.shorturl.dto.CreateShortUrlVo;
import com.huaixia.shorturl.dto.ShortUrlQuery;
import com.huaixia.shorturl.pagehelper.PageResult;
import org.springframework.data.domain.Page;
import org.springframework.web.servlet.view.RedirectView;

import javax.servlet.http.HttpServletRequest;

/**
 * @author biliyu
 * @date 2023/6/6 10:47
 */
public interface ShortUrlService {
    ApiResponse<String> createShortUrl(CreateShortUrlVo createShortUrlVo);

    RedirectView redirect(HttpServletRequest request, String key);

    ApiResponse<PageResult<UrlMap>> getShortUrlList(ShortUrlQuery query);
}
